package cn.kgc.flymanager01.controller;


import cn.kgc.flymanager01.pojo.City;
import cn.kgc.flymanager01.pojo.ResultEntity;
import cn.kgc.flymanager01.servcie.CityService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author niejianhang
 * @create 2020-05-31 11:19
 */
@CrossOrigin("*")
@RestController
public class CityController {

    @Resource
    CityService cityService;

    @RequestMapping("/getCityList")
    public ResultEntity<List<City>> selAll(){
        List<City> list = cityService.selAll();
        return ResultEntity.successWithoutData(list);
    }





}
